import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

export default function interBankAPI(api) {
  return {
    // 获取无冲击变现天数持仓分布
    getBackInfo: (query) => api.get(`${config.interfaces.type1}NegotiatedBuyback/getAccurateDay`, query),
    // 获取持仓信息
    getPositionData: (query) => api.get(`${config.interfaces.type1}buyBackOrder/queryKZYQList`, query),
    // 获取融券回购的剩余本金
    getqueryBondInfo: (query) => api.get(`${config.interfaces.type1}bondTrade/queryBondInfo`, query),
    // 下达指令
    SaveInstruction: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction`, query),
    // 保存簿记
    SaveInstructionw2: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction2`, query),
    // 簿记交收
    getTradeInstruction: (query) => api.get(`${config.interfaces.type1}tradeOperate/getTradeInstruction`, query),
    // 存续管理
    tradeBookSave: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction3`, query),
    // 获取实际占款天数
    getOccupationDays: (query) => api.get(`${config.interfaces.type1}bondTrade/calcOccupiedDays`, query),
  };
}
